<?php
/**
 * 节点授权
 * ip验证
 * 节点权限验证
 */

namespace app\common\model;


class Auth
{
    static public function check($privilege)
    {
        $request=request();
        $module=$request->module();
        $controller=$request->controller();
        $action=$request->action();
        if(!isset($privilege[$module][$controller][$action])){
            Out::exception('无权限:'.$module.DIRECTORY_SEPARATOR.$controller.DIRECTORY_SEPARATOR.$action);
        }
    }

    static public function getPrivilege($id){
        return [];
    }

    static public function checkIp($ip,$action,$gameId){

    }

    static public function channelCheck($ip,$action,$channelId){

    }
}